#include <stdio.h>

using namespace std;

class Data{
public:
   int year;
   int month;
   int day;
   

     Data(int year, int month, int day);

     bool setDate(int day,int month,int year){
		if(isDayValid(day, month) && isMonthValid(month)){
			this->day=day;
			this->month=month;
			this->year=year;
			return true;
		}
		return false;
     }

     bool setYear(int year){
		this->year=year;
		return true;
     }

     bool setMonth(int month){
		if(isMonthValid(month)){
			this->month=month;
			return true;
		}
		return false;
     }

     bool isMonthValid(int month) {
		return month>=1 && month<=12;
     }

     bool setDay(int day){
		if(isDayValid(day,month)){
			this->day=day;
			return true;
		}
		return false;
     }

     bool isDayValid(int day,int month) {
		int maxDay=0;
		switch (month) {
			case 3: case 5: case 9: case 10: maxDay=30; break;
			case 2: maxDay=28; break;
			default: maxDay=31;
		}
		return day>=0 && day<=maxDay;
     }

     void getMonthString(int month){
		switch (month) {
			case 1: printf("Gennaio\n"); break;
			case 2: printf("Febbraio\n"); break;
			case 3: printf("Marzo\n"); break;
			case 4: printf("Aprile\n"); break;
			case 5: printf("Maggio\n"); break;
			case 6: printf("Giugno\n"); break;
			case 7: printf("Luglio\n"); break;
			case 8: printf("Agosto\n"); break;
			case 9: printf("Settembre\n"); break;
			case 10: printf("Ottobre\n"); break;
			case 11: printf("Novembre\n"); break;
                        case 12: printf("Dicembre\n");
		}
     }
     void stamp(){
        printf("%d %d %d",this->day,this->month,this->year);
     }
};


Data::Data(int year, int month, int day) {
		this->year = year;
		this->month = month;
		this->day = day;
}

